home *** CD-ROM | disk | FTP | other *** search
- /*
- ARCHIMEDEAN SOLIDS for POV-Ray 2.2
- ==================================
- Constructed by Grant Hutchison [100047,144]
- Much data and encouragement from Tom Gettys [72730,2013]
- Other data from "Polyhedron Models" by Magnus Wenninger
-
- Archimedean solids are solid shapes whose faces are all
- regular polygons of two or more kinds, and whose vertices
- are all identical. There are 13 different kinds. Two (the
- snub cube and snub dodecahedron) come in paired mirror-
- image forms. The others can be formed by simple truncation
- (chopping the corners off) of simpler solids. All have
- pleasingly symmetrical crystalline forms, and are declared
- below.
-
- They are:
-
- Truncated_Tetrahedron
- 8 sides (4 triangles, 4 hexagons)
-
- Truncated_Cube
- 14 sides (8 triangles, 6 octagons)
- Truncated_Octahedron
- 14 sides (6 squares, 8 hexagons)
- Cuboctahedron
- 14 sides (8 triangles, 6 squares)
-
- Truncated_Dodecahedron
- 32 sides (20 triangles, 12 dodecagons) - soccer ball pattern
- Truncated_Icosahedron
- 32 sides (12 pentagons, 20 hexagons) - soccer ball / fullerene shape
- Icosidodecahedron
- 32 sides (20 triangles, 12 pentagons)
-
- Small_Rhombicuboctahedron
- 26 sides (8 triangles, 18 squares)
- Great_Rhombicuboctahedron
- 26 sides (12 squares, 8 hexagons, 6 octagons)
-
- Small_Rhombicosidodecahedron
- 62 sides (20 triangles, 30 squares, 12 pentagons)
- Great_Rhombicosidodecahedron
- 62 sides (30 squares, 20 hexagons, 12 dodecagons)
-
- Snub_Cube
- 38 sides (32 triangles, 6 squares) - two mirror-image forms
- Snub_Dodecahedron
- 92 sides (80 triangles, 12 pentagons) - two mirror-image forms
-
- Two rhombic polyhedra are also declared. These are
- regular solids whose faces are all identical diamond shapes.
- They are needed for some of the truncations.
-
- They are:
-
- Rhombic_Dodecahedron
- 12 faces - like a garnet crystal
- Rhombic_Triacontahedron
- 30 faces - complex, interesting appearance
-
- Also declared are SnubSquarePyramid and SnubPentPyramid,
- needed for the formation of the two snubs, and, at the start,
- some basic unit polyhedra similar to those from shapes2.inc,
- created by Tom Price.
- Like Tom Price's Platonic solids, all the solids below
- are scaled to have unit internal spheres: in each case,
- the largest faces of the solid lie one unit from the
- origin, so that the unscaled, undisplaced solid could rest
- one of its largest faces on a horizontal plane at y = -1.
- The various component polyhedra have been coloured, to
- highlight the construction of the Archimedeans by
- intersection of Platonic solids.
- */
-
- #include "colors.inc"
-
- //UNIT SOLIDS
- //These solids are based on those created by Tom Price
- //for the shapes2.inc file, but some of the angles and
- //orientations are different.
-
- #declare Unit_Cube =
- box { <-1, -1, -1>, <1, 1, 1> pigment {color Blue}}
-
- #declare Unit_Octahedron =
- intersection {
- plane { -z, 1 rotate <35.264390, 45, 0> }
- plane { -z, 1 rotate <35.264390, 135, 0> }
- plane { -z, 1 rotate <35.264390, 225, 0> }
- plane { -z, 1 rotate <35.264390, 315, 0> }
- plane { -z, 1 rotate <-35.264390, 45, 0> }
- plane { -z, 1 rotate <-35.264390, 135, 0> }
- plane { -z, 1 rotate <-35.264390, 225, 0> }
- plane { -z, 1 rotate <-35.264390, 315, 0> }
- pigment {color White}
- }
-
- #declare Unit_Dodecahedron =
- intersection {
- plane { -z, 1 rotate <26.565051, 36, 0> }
- plane { -z, 1 rotate <26.565051, 108, 0> }
- plane { -z, 1 rotate <26.565051, 180, 0> }
- plane { -z, 1 rotate <26.565051, 252, 0> }
- plane { -z, 1 rotate <26.565051, 324, 0> }
- plane { -z, 1 rotate <-26.565051, 0, 0> }
- plane { -z, 1 rotate <-26.565051, 72, 0> }
- plane { -z, 1 rotate <-26.565051, 144, 0> }
- plane { -z, 1 rotate <-26.565051, 216, 0> }
- plane { -z, 1 rotate <-26.565051, 288, 0> }
- plane { -z, 1 rotate -90*x }
- plane { -z, 1 rotate 90*x }
- pigment {color Red}
- }
-
- #declare Unit_Icosahedron =
- intersection {
- plane { -z, 1 rotate <52.622632, 0, 0> }
- plane { -z, 1 rotate <52.622632, 72, 0> }
- plane { -z, 1 rotate <52.622632, 144, 0> }
- plane { -z, 1 rotate <52.622632, 216, 0> }
- plane { -z, 1 rotate <52.622632, 288, 0> }
- plane { -z, 1 rotate <10.812317, 0, 0> }
- plane { -z, 1 rotate <10.812317, 72, 0> }
- plane { -z, 1 rotate <10.812317, 144, 0> }
- plane { -z, 1 rotate <10.812317, 216, 0> }
- plane { -z, 1 rotate <10.812317, 288, 0> }
- plane { -z, 1 rotate <-10.812317, 36, 0> }
- plane { -z, 1 rotate <-10.812317, 108, 0> }
- plane { -z, 1 rotate <-10.812317, 180, 0> }
- plane { -z, 1 rotate <-10.812317, 252, 0> }
- plane { -z, 1 rotate <-10.812317, 324, 0> }
- plane { -z, 1 rotate <-52.622632, 36, 0> }
- plane { -z, 1 rotate <-52.622632, 108, 0> }
- plane { -z, 1 rotate <-52.622632, 180, 0> }
- plane { -z, 1 rotate <-52.622632, 252, 0> }
- plane { -z, 1 rotate <-52.622632, 324, 0> }
- pigment {color Green}
- }
-
-
- //RHOMBIC POLYHEDRA
-
- #declare Rhombic_Dodecahedron =
- intersection {
- box { <-1, -1, -2>, <1, 1, 2> rotate 45*z }
- box { <-1, -2, -1>, <1, 2, 1> rotate 45*y }
- box { <-2, -1, -1>, <2, 1, 1> rotate 45*x }
- pigment {color Yellow}
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Rhombic_Triacontahedron =
- intersection {
- box { <-1, -1, -1>, <1, 1, 1> rotate <31.717474, 0, 0> }
- box { <-1, -1, -1>, <1, 1, 1> rotate <31.717474, 72, 0> }
- box { <-1, -1, -1>, <1, 1, 1> rotate <31.717474, 144, 0> }
- box { <-1, -1, -1>, <1, 1, 1> rotate <31.717474, 216, 0> }
- box { <-1, -1, -1>, <1, 1, 1> rotate <31.717474, 288, 0> }
- pigment {color Yellow}
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
-
- //ARCHIMEDEAN TRUNCATED SOLIDS
-
- #declare Truncated_Tetrahedron =
- intersection {
- plane { -y, 0.75 pigment {color Cyan} }
- plane { -z, 0.75 rotate <19.471221, 0, 0> pigment {color Cyan} }
- plane { -z, 0.75 rotate <19.471221, 120, 0> pigment {color Cyan} }
- plane { -z, 0.75 rotate <19.471221, 240, 0> pigment {color Cyan} }
- plane { y, 1.25 pigment {color Magenta} }
- plane { -z, 1.25 rotate <-19.471221, 60, 0> pigment {color Magenta} }
- plane { -z, 1.25 rotate <-19.471221, 180, 0> pigment {color Magenta} }
- plane { -z, 1.25 rotate <-19.471221, 300, 0> pigment {color Magenta} }
- translate -0.25*y
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Truncated_Cube =
- intersection {
- object { Unit_Cube }
- object { Unit_Octahedron scale <1.393847, 1.393847, 1.393847> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Truncated_Octahedron =
- intersection {
- object { Unit_Octahedron }
- object { Unit_Cube scale <1.154700, 1.154700, 1.154700> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Cuboctahedron =
- intersection {
- object { Unit_Cube }
- object { Unit_Octahedron scale <1.154700, 1.154700, 1.154700> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Truncated_Dodecahedron =
- intersection {
- object { Unit_Dodecahedron }
- object { Unit_Icosahedron scale <1.169840, 1.169840, 1.169840> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Truncated_Icosahedron =
- intersection {
- object { Unit_Icosahedron }
- object { Unit_Dodecahedron scale <1.026626, 1.026626, 1.026626> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Icosidodecahedron =
- intersection {
- object { Unit_Dodecahedron }
- object { Unit_Icosahedron scale <1.098014, 1.098014, 1.098014> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Small_Rhombicuboctahedron =
- intersection {
- object { Unit_Cube }
- object { Rhombic_Dodecahedron }
- object { Unit_Octahedron scale <1.055643, 1.055643, 1.055643> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Great_Rhombicuboctahedron =
- intersection {
- object { Unit_Cube }
- object { Rhombic_Dodecahedron scale <1.153010, 1.153010, 1.153010> }
- object { Unit_Octahedron scale <1.092235, 1.092235, 1.092235> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Small_Rhombicosidodecahedron =
- intersection {
- object { Unit_Dodecahedron }
- object { Rhombic_Triacontahedron scale <1.025894, 1.025894, 1.025894> }
- object { Unit_Icosahedron scale <1.044417, 1.044417, 1.044417> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Great_Rhombicosidodecahedron =
- intersection {
- object { Unit_Dodecahedron }
- object { Rhombic_Triacontahedron scale <1.085765, 1.085765, 1.085765> }
- object { Unit_Icosahedron scale <1.065749, 1.065749, 1.065749> }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
-
- //PYRAMIDS REQUIRED TO CREATE SNUBS
-
- #declare SnubSquarePyramid =
- intersection {
- plane { -z, 0 rotate <37.016570, 0, 16.467560> }
- plane { -z, 0 rotate <37.016570, 0, 106.467560> }
- plane { -z, 0 rotate <37.016570, 0, 196.467560> }
- plane { -z, 0 rotate <37.016570, 0, 286.467560> }
- pigment {color Orange}
- translate -1.329949*z
- }
-
- #declare SnubPentPyramid =
- intersection {
- plane { -z, 0 rotate <27.070080, 0, 12.017840> }
- plane { -z, 0 rotate <27.070080, 0, 84.017840> }
- plane { -z, 0 rotate <27.070080, 0, 156.017840> }
- plane { -z, 0 rotate <27.070080, 0, 228.017840> }
- plane { -z, 0 rotate <27.070080, 0, 300.017840> }
- pigment {color Orange}
- translate -1.177550*z
- }
-
-
- //SNUBS
- //(For mirror image forms, scale <-1, 1, 1>)
-
- #declare Snub_Cube =
- intersection {
- object { Unit_Cube }
- object { Unit_Octahedron scale <1.061913, 1.061913, 1.061913> }
- object { SnubSquarePyramid }
- object { SnubSquarePyramid rotate 90*y }
- object { SnubSquarePyramid rotate 180*y }
- object { SnubSquarePyramid rotate 270*y }
- object { SnubSquarePyramid rotate 90*x }
- object { SnubSquarePyramid rotate -90*x }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
- #declare Snub_Dodecahedron =
- intersection {
- object { Unit_Dodecahedron }
- object { Unit_Icosahedron scale <1.049627, 1.049627, 1.049627> }
- object { SnubPentPyramid rotate 180*z rotate <-26.565051, 0, 0> }
- object { SnubPentPyramid rotate 180*z rotate <-26.565051, 72, 0> }
- object { SnubPentPyramid rotate 180*z rotate <-26.565051, 144, 0> }
- object { SnubPentPyramid rotate 180*z rotate <-26.565051, 216, 0> }
- object { SnubPentPyramid rotate 180*z rotate <-26.565051, 288, 0> }
- object { SnubPentPyramid rotate <26.565051, 36, 0> }
- object { SnubPentPyramid rotate <26.565051, 108, 0> }
- object { SnubPentPyramid rotate <26.565051, 180, 0> }
- object { SnubPentPyramid rotate <26.565051, 252, 0> }
- object { SnubPentPyramid rotate <26.565051, 324, 0> }
- object { SnubPentPyramid rotate -90*x }
- object { SnubPentPyramid rotate 90*x }
- bounded_by { sphere { < 0, 0, 0, >, 1.8 } }
- }
-
-
- // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- // ADD A SCENE
- // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- global_settings { assumed_gamma 2.2 }
-
- camera {
- location < 20.0, 20.0, -60.0 >
- direction < 0.0, 0.0, 6.0 >
- up < 0.0, 1.0, 0.0 >
- // right < 1.33333, 0.0, 0.0 >
- right < 160/120, 0.0, 0.0 >
- look_at < 0.0, 0.0, 0.0 >
- }
-
- light_source { < 100.0, 100.0, -100.0 > colour rgb 1 }
-
- light_source { < -100.0, 0.0, -50.0 > colour rgb 0.5 }
-
- object { Rhombic_Dodecahedron translate < -6.0, 3.0, 0.0 > }
- object { Rhombic_Triacontahedron translate < -3.0, 3.0, 0.0 > }
- object { Truncated_Tetrahedron translate < 0.0, 3.0, 0.0 > }
- object { Truncated_Cube translate < 3.0, 3.0, 0.0 > }
- object { Truncated_Octahedron translate < 6.0, 3.0, 0.0 > }
-
- object { Cuboctahedron translate < -6.0, 0.0, 0.0 > }
- object { Truncated_Dodecahedron translate < -3.0, 0.0, 0.0 > }
- object { Truncated_Icosahedron translate < 0.0, 0.0, 0.0 > }
- object { Icosidodecahedron translate < 3.0, 0.0, 0.0 > }
- object { Small_Rhombicuboctahedron translate < 6.0, 0.0, 0.0 > }
-
- object { Great_Rhombicuboctahedron translate < -6.0, -3.0, 0.0 > }
- object { Snub_Cube translate < -3.0, -3.0, 0.0 > }
- object { Snub_Dodecahedron translate < 0.0, -3.0, 0.0 > }
- object { Snub_Cube scale < -1, 1, 1 > translate < 3.0, -3.0, 0.0 > }
- object { Snub_Dodecahedron scale < -1, 1, 1 > translate < 6.0, -3.0, 0.0 > }
-